<template>
    <view>
        <web-view v-if="webUrl" :src="webUrl"></web-view>
    </view>

</template>

<script>
    import {
        mapState
    } from 'vuex';
    export default {
        computed: {
            ...mapState(['host'])
        },
        data() {
            return {
                webUrl: ""
            };
        },
        onLoad(e) {
            
            uni.setNavigationBarTitle({
                title: e.webTitle,
            });
            if (e.webUrl.indexOf('www.') >= 0 ||
                e.webUrl.indexOf('http:') >= 0 ||
                e.webUrl.indexOf('https:') >= 0) {
                this.webUrl = e.webUrl;
            } else {
                this.webUrl = this.host + e.webUrl;
            }
            console.log('++++ load web url = ' + this.webUrl);
        },
        methods: {
        }
    }
</script>

<style></style>
